<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>新增用户</title>
		<META http-equiv=Content-Type content="text/html; charset=UTF-8">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" language="javascript"
			src="<%=request.getContextPath()%>/js/jquery-1.3.2.js"></script>
	<script type="text/javascript">
		function checkData(){
			var roleId=$("#roleId").val();
			if(isNaN(roleId)){
				alert("角色Id只能为整数！");
				return false;
			}
			return true;
		}
	</script>

	</head>

	<body>
		<form action="user/insertUser.action" method="post" onsubmit="return checkData()">
			登录名：<input type="text" name="userVO.loginName" /><br />
			登录密码 ：<input type="password" name="userVO.loginPswd" /><br /><br />
			角色Id ：<input type="text" name="userVO.roleId" id="roleId" /><br />
			角色类型 ：<input type="text" name="userVO.roleType" /><br />
			状态：<s:radio list="#{'0':'启用','1':'关闭'}" name="userVO.status" value="0"></s:radio>
			<input type="submit" value=" 新增  " />
		</form>
		<s:if test="errorMsg != null && !errorMsg.equals('')">
			<script type="text/javascript">
				alert('${errorMsg}');
			</script>
		</s:if>
	</body>
</html>
